﻿module Sustainalytics.LRTM {

    import Common = Sustainalytics.Common;

    export class LongRunningTaskManagerSettingsService implements ILongRunningTaskManagerSettingsService {

        constructor(
            private $q: ng.IQService,
            private $http: ng.IHttpService) {
        }

        // get task manager settings
        public get(): ng.IHttpPromise<LongRunningTaskManagerSettingsDto> {
            var ctx = this;

            var url = '/lrtmserv/api/v1/taskManagerSettings?';

            var promise = ctx.$http.get(url);

            return promise;
        }
    }


    angular.module('Sustainalytics.LRTM').factory('LongRunningTaskManagerSettingsService',
        function ($q, $http) {
            var service = new LongRunningTaskManagerSettingsService($q, $http);
            return service;
        });
}